![](/img/trans.png)
[英]FIrebase or object/Array- how to add a number/value to a variable without using the variable value?
[英]i want store (array- of object- of array value )in variable
gstPercent: "25"
hsnCode: "856657089900"
idata: null
materialCode: "212321"
materialName: "216465132"
pricing: {pricingHistory: [
salesPricing: 1235
]
}
status: true
给定数据
我正在尝试:
var sellingPrice = matListOfOne.find(p => p.pricing.pricingHistory.filter(function (s){
return s.salesPricing;
}));
该数组应包含大量的字符串值或对象。
正确的 json 应该是:
gstPercent: "25",
hsnCode: "856657089900",
idata: null,
materialCode: "212321",
materialName: "216465132",
pricing: {pricingHistory:[
{salesPricing: '1235'}
]
}
您的代码现在应该可以工作了
这有效//在变量中存储定价obj
var pricing = oneMatData.find(function (p) {
return p.pricing;` `
}).pricing;
var salesPricing = price.pricingHistory[0].salesPricing;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.