has the following object:
requires the input attribute and the depth of this attribute, and outputs the value corresponding to this attribute
Why can"t you enter the attribute directly, because the name may be duplicated? the outermost Status
in the JSON above and Status under Result have the same name
findValue (key,depth)
{
"Status":"200",
"Message":"",
"OrderNumber":null,
"Result":{
"Partners":[
{
"StockName":"xx",
"StockType":"",
"StockPercent":"49.1900%",
"ShouldCapi":"491.900000"
}
],
"Employees":[
{
"Name":"xx",
"Job":""
},
{
"Name":"xx",
"Job":""
}
],
"Branches":[
{
"CompanyId":"8dc057af59e908b6a1c05d74de114134",
"RegNo":"500902300083458",
"Name":"",
"BelongOrg":"",
"CreditCode":null,
"OperName":"xx"
}
],
"ChangeRecords":[
{
"ProjectName":"",
"BeforeContent":";",
"AfterContent":";",
"ChangeDate":"2017-07-21T00:00:00+08:00"
}
],
"ContactInfo":{
"WebSite":[
{
"Name":null,
"Url":"www.xiaojukeji.com"
}
],
"PhoneNumber":"010-83043726",
"Email":"zhangyimei@diditaxi.com.cn"
},
"Industry":{
"Industry":"",
"SubIndustry":""
},
"KeyNo":"4659626b1e5e43f1bcad8c268753216e",
"Name":"",
"No":"110108015068911",
"BelongOrg":"",
"OperName":"",
"StartDate":"2012-07-10T00:00:00+08:00",
"EndDate":null,
"Status":""
}
}
such as
findval ("Partners", 2) output
[{
"StockName":"xx",
"StockType":"",
"StockPercent":"49.1900%",
"ShouldCapi":"491.900000"
}
]
findVal ("WebSite", 3) output
[{
"Name":null,
"Url":"www.xiaojukeji.com"
}],
findVal ("WebSite", 3) output