我有以下JSON发送到来自浏览器的服务器:如何检查一个键是否存在于节点中的嵌套JSON对象中?
{
"title": "Testing again 2",
"abstract": "An example document",
"_href": "http://google.com",
"tags": [ "person" ],
"attributes": [ {
"id": 1,
"type": "TEXT",
"data": "test"
} ],
"sections": [ {
"id": 1,
"type": "LIST",
"data": [ {
"revision": 124,
"text": "test"
} ]
} ]
}
我需要确保密钥“_href”,“ID”和“修订”是不是在任何地方对象在任何级别。我发现this但它不太合适。
这不会在更深层次上检查。 – 2016-09-29 07:01:53