Public
Edited
Mar 10, 2023
Insert cell
Insert cell
{
var results = [
{
"Id": "example_2_2",
"Name": "example_2_2",
"Cumulative": {
"ForceX": -850.9,
"ForceY": 153.5,
"ForceZ": 0.0,
"MomentX": 0.0,
"MomentY": 0.0,
"MomentZ": 48444.0
},
"LoadClasses": {},
"BiaxialMomentData": {
"ForceLevel": -850.9,
"UnfactMoments1": [
28236.099790363412,
23919.78177907471,
12887.887794600174,
-0.0829452059347087,
-14529.689721816965,
-29202.330842110081,
-33852.382540902465,
-27295.863031283334,
-12656.414732043315,
0.20672494109616163,
12152.412532518943,
24272.462150034968,
28236.099787315623
],
"UnfactMoments2": [
0.0,
13810.131499028828,
22322.602702643664,
22581.152862544914,
25165.876175983882,
16859.735204275556,
-0.24869348862440016,
-15759.585800695353,
-21922.049255118858,
-18759.72393547641,
-21048.000776098273,
-14013.276677362504,
0.41486794338027033
],
"FactMoments1": [
27660.659803841794,
22991.38178212435,
12110.149411663628,
-0.0776879050040624,
-13369.233949578671,
-27004.00933332045,
-31797.998357287503,
-25665.017115971827,
-11980.891498728623,
0.20330770346119317,
11831.042953601171,
23718.589892506545,
27660.65980085612
],
"FactMoments2": [
0.0,
13274.11799522677,
20975.5126902552,
21149.895749834002,
23155.930552162077,
15590.551633537729,
-0.23360113968911675,
-14817.997835493108,
-20751.982225298081,
-18449.618950978635,
-20491.388076490253,
-13693.508326682433,
0.40641310699991196
]
},
"DemCapRatio": {
"Force": -850.9,
"Moment1": 48444.0,
"Moment2": 0.0,
"Ratio": 1.7514
}
}
];
var biaxialMoments = [];
results.forEach(function (result) {
biaxialMoments.push({
resultCaseName: 0,
biaxInterData: 1,
demCapRatio: {
"Force": -850.9,
"Moment1": 48444.0,
"Moment2": 0.0,
"Ratio": 1.7514
}
});
});


biaxialMoments.forEach(function (biaxialMoment) {
Object.keys(biaxialMoment.demCapRatio).forEach(function (demCapRatioId) {
if (demCapRatioId == "Ratio" && biaxialMoment.demCapRatio[demCapRatioId] == null) return;
biaxialMoment.demCapRatio[demCapRatioId] = 4;
});
});
return biaxialMoments;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more