Skip to main content
Answer

Search in JSON object type column data

  • October 17, 2023
  • 3 replies
  • 83 views

I am looking for function/query that can search in  JSON type data against array of values. Json can have nested keys. I tried using JSON_SEARCH or JSON_CONTAINS . getting Undefined function:

JSON_SEARCH(data->'$[*]', JSON_ARRAY("abc"))

 

Is there a way to search in JSON object keys for list of values ? for e.g :

JSON col data {"name":"Back","address":{"location":{"country":[{"city":{"state":[‘jkl’,’fgh’]},"type":"home"},"empId":"e100043867","FullName":"Back"}

JSON_ARRAY = [‘name’,’state’,’country’]

check if JSON_ARRAY values exists in JSON data ?

Any help would be appreciated.

Best answer by Dilini Fernando

Hi @Rimmi Anand,

I’m closing this topic now, please feel free to create a new post if you still experience problems.

Best regards,
Dilini 

3 replies

Forum|alt.badge.img

Hi,

Looking at your question, I’m not sure where you’re trying to query against (what API/service) in CDF?


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • November 9, 2023

Hi @Rimmi Anand,

Could you please provide additional details about your inquiry for Thomas to better understand the situation?

Best regards,
Dilini 


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • Answer
  • November 22, 2023

Hi @Rimmi Anand,

I’m closing this topic now, please feel free to create a new post if you still experience problems.

Best regards,
Dilini