79135722

Date: 2024-10-29 03:09:28
Score: 0.5
Natty:
Report link

Testing with https://json-everything.net/json-path/, the following expression works with the above JSON example. Split across multiple lines for clarity:

$[?    (@.type=="Conveyor - Single Item" || @.type=="Conveyor - Accumulating") 
       && 
       @["Downstream Device"][?search(@.value, SEARCH_STRING)] 

  ||   @.type=="Shuttle" 
       && 
       @["Locations"][*]["Downstream Device"][?search(@.value, SEARCH_STRING)]
]
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Cliff Pennalligen