У меня есть данные Json, сгенерированные из двух разных классов в Asp.net MVC с использованием ajax.Когда я повторяю этот результат для вывода данных, он выводится как неопределенный.Я выполнил следующий код для получения значения
<script>
$(document).ready(function () {
$('#btn_ffCalculate').on('click', function (evnt) {
var plen = ($('#plinthLength').val() == "") ? 0 : $('#plinthLength').val();
var pwid = ($('#plinthWidth').val() == "") ? 0 : $('#plinthWidth').val();
var phgt = ($('#plinthHeight').val() == "") ? 0 : $('#plinthHeight').val();
var dnsty = ($('#density').val() == "") ? 0 : $('#density').val();
var dff1 = ($('#distnFromFloor1').val() == "") ? 0 : $('#distnFromFloor1').val();
var dff2 = ($('#distnFromFloor2').val() == "") ? 0 : $('#distnFromFloor2').val();
var dff3 = ($('#distnFromFloor3').val() == "") ? 0 : $('#distnFromFloor3').val();
var dff4 = ($('#distnFromFloor4').val() == "") ? 0 : $('#distnFromFloor4').val();
$.ajax({
type: 'POST',
url: 'floatingFloorCalc',
dataType: 'Json',
data: {
, re63: $('#roomEffect63').val()
, re125: $('#roomEffect125').val()
, re250: $('#roomEffect250').val()
, re500: $('#roomEffect500').val()
, re1k: $('#roomEffect1k').val()
, re2k: $('#roomEffect2k').val()
, re4k: $('#roomEffect4k').val()
, re8k: $('#roomEffect8k').val()
, ncrid: $('#ncnrId').val()
},
success: function (data) {
var rspnse = $.parseJSON(data);
$.each(rspnse.GetTbic, function (tbicIndex, tbicValue) {
alert(tbicIndex + " : " + tbicValue.rmLen);
});
}
});
});
});
</script>
Ниже приведены данные json, сгенерированные кодом
{
"GetTbic":{
"rmLen":1.0,
"rmWid":1.0,
"rmHgt":1.0,
"totalRoomArea":64.56,
"totalRoomAreaInFt":21.52,
"roomVolInFt":35.31,
"listAllCoefficeint":[
[
0.07,
0.1,
0.05,
0.06,
0.07,
0.09,
0.08,
0.064
],
[
0.126,
0.18,
0.06,
0.04,
0.03,
0.02,
0.02,
0.016
],
[
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
]
],
"listAreaCoefMulti":[
[
1.5064000000000002,
2.152,
1.076,
1.2912,
1.5064000000000002,
1.9367999999999999,
1.7216,
1.37728
],
[
2.71152,
3.8735999999999997,
1.2912,
0.8608,
0.6456,
0.4304,
0.4304,
0.34432
],
[
21.52,
21.52,
21.52,
21.52,
21.52,
21.52,
21.52,
21.52
]
],
"listAreaCoefSum":[
25.73792,
27.5456,
23.8872,
23.672,
23.672,
23.8872,
23.672,
23.2416
],
"listAirAbsorption":[
0.0,
0.0,
0.0,
0.0,
0.0,
0.1,
0.2,
0.8
],
"listRoomObsoprtion":[
25.73792,
27.5456,
23.8872,
23.672,
23.672,
23.9872,
23.872,
24.0416
],
"listRoomConstant":[
36.7,
40.9,
32.7,
32.3,
32.3,
32.9,
32.7,
33.0
]
},
"Gettspl":{
"listSndPwrLvl":[
98.0,
98.0,
98.0,
98.0,
98.0,
98.0,
98.0,
98.0
],
"listCspl":[
103.0,
103.0,
103.0,
103.0,
103.0,
103.0,
103.0,
103.0
],
"listSplReduc":[
[
0.0,
0.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
],
[
0.0,
0.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
],
[
0.0,
0.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
],
[
0.0,
0.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
]
],
"listSwlSI":[
[
103.0,
103.0,
104.0,
104.0,
104.0,
104.0,
104.0,
104.0
],
[
103.0,
103.0,
104.0,
104.0,
104.0,
104.0,
104.0,
104.0
],
[
103.0,
103.0,
104.0,
104.0,
104.0,
104.0,
104.0,
104.0
],
[
103.0,
103.0,
104.0,
104.0,
104.0,
104.0,
104.0,
104.0
]
],
"listRsltFloorWidFF":[
59.0,
56.0,
54.0,
47.0,
41.0,
34.0,
29.0,
25.0
],
"listRsltntFloor":[
[
66.0,
64.0,
64.0,
58.0,
53.0,
47.0,
42.0,
38.0
],
[
66.0,
64.0,
64.0,
58.0,
53.0,
47.0,
42.0,
38.0
],
[
66.0,
64.0,
64.0,
58.0,
53.0,
47.0,
42.0,
38.0
],
[
66.0,
64.0,
64.0,
58.0,
53.0,
47.0,
42.0,
38.0
]
],
"listDeviatFF":[
12.0,
20.0,
25.0,
25.0,
24.0,
20.0,
17.0,
14.0
],
"listDeviFfAtMt":[
[
19.0,
28.0,
35.0,
36.0,
36.0,
33.0,
30.0,
27.0
],
[
19.0,
28.0,
35.0,
36.0,
36.0,
33.0,
30.0,
27.0
],
[
19.0,
28.0,
35.0,
36.0,
36.0,
33.0,
30.0,
27.0
],
[
19.0,
28.0,
35.0,
36.0,
36.0,
33.0,
30.0,
27.0
]
],
"listDeviatNoFloor":[
19.0,
28.0,
34.0,
35.0,
35.0,
32.0,
29.0,
26.0
]
}
}
оповещения (tbicValue.rmLen);должен выдавать 1 как выходной, но выходной "неопределен"