有一个JSON响应,在多个集合中有这么多乐器(>100+)。如何最好地匹配每个项目集item_list
值与item_number
和item_info
的精确总和或串联。
验证在以下求和或级联时失败:* match each response[*].item_list = $response[*].item_number + "--" + $response[*].item_info
个
[{
"item_number":01,
"item_info": "Piano",
"item_list": "01--Piano"
},
{
"item_number":02,
"item_info": "Mrudanga",
"item_list": "02--Mrudanga"
},
{
"item_number":03,
"item_info": "Guitar",
"item_list": "03--Guitar"
},
{
"item_number":04,
"item_info": "Flute",
"item_list": "04--Flute"
},
...
...
...
...
...
]
字符串
1条答案
按热度按时间6tqwzwtp1#
如果数值正确,这将起作用:
字符串
您可能需要做一些预处理:
型