JSON/regexp如何匹配包含特定属性的对象?

JSON/regexp如何匹配包含特定属性的对象?,json,regex,Json,Regex,例如,如何匹配包含“性别”的所有对象:“男性” 也许这种模式可以帮助您: (?!^)\{.*?(?=“性别\”).*?} 非常感谢 { "name":"John", "surname":"Jackson", "children":[ { "name":"Mike", "gender&

例如,如何匹配包含
“性别”的所有对象:“男性”


也许这种模式可以帮助您:

(?!^)\{.*?(?=“性别\”).*?}


非常感谢
{
   "name":"John",
   "surname":"Jackson",
   "children":[
      {
         "name":"Mike",
         "gender":"male"
      },
      {
         "gender":"female",
         "name":"Jane"
      },
      {
         "name":"Sarah",
         "gender":"female"
      },
      {
         "gender":"male",
         "name":"Paul"
      }
   ]
}