问题描述
我有一个以下格式的JSON字符串;我想通过javascript访问它的属性。
{
扣减:{
修复:[
{
金额:5000.00,
AmountRaw:5000,
类型:公用事业津贴Dedctn - (D)
}
],
变量:[]
},
收入:{
修复:[
{
金额:123546.00,
AmountRaw:123546,
类型:基本 - (E)
},
{
金额:123546.00,
AmountRaw:123546,
输入:房屋租金津贴
},
{
金额:123546.00,
AmountRaw:123546,
类型:Trasport Allowance
}
],
变量:[
{
金额:10000.00,
AmountRaw:10000,
类型:费用报销
}
]
}
}
I have a JSON string of the below format; I want to access it''s properties through javascript.
{
"Deductions": {
"Fix": [
{
"Amount": "5000.00",
"AmountRaw": 5000,
"Type": "Utilities Allowance Dedctn -(D)"
}
],
"Variable": []
},
"Earning": {
"Fix": [
{
"Amount": "123546.00",
"AmountRaw": 123546,
"Type": "Basic -(E)"
},
{
"Amount": "123546.00",
"AmountRaw": 123546,
"Type": "House Rent Allowance"
},
{
"Amount": "123546.00",
"AmountRaw": 123546,
"Type": "Trasport Allowance"
}
],
"Variable": [
{
"Amount": "10000.00",
"AmountRaw": 10000,
"Type": "Expense Reimbursement"
}
]
}
}
推荐答案
这篇关于在javascript中使用JSON对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!