【发布时间】:2022-01-22 08:44:29
【问题描述】:
在下面的 JSON 中,如何使用正则表达式匹配名为“Item of Equipment”的父键,其值在变化且不可预测?
"type": "title" 是该节点独有的,"title:" 的存在也是如此。
又名:“如何使用子元素匹配父值?
找到“Item of Equipment”的另一种方法是在属性“name”中查找它,它是重复的,作为"type": "title 的同级。在这种情况下,"type": "title" 始终具有唯一性“name”的兄弟
..
"id": "Xkt@",
"name": "My Email",
"type": "email"
},
"Item of Equipment": {
"id": "title",
"title": {},
"name": "Item of Equipment",
"type": "title"
},
"My Date": {
"id": "nYcK",
"name": "My Date",
"type": "date",
..
我不会使用 JSON 解析器,我将无权访问。我正在通过 iOS Shortcuts 的“匹配”操作来运行它。
【问题讨论】: