Hi ,
I have two sets of JSON data. I want to find the keys which are unique in one dataset and also keys which are missing in the same in comparison with the other dataset.
My first data set ...
See more...
Hi ,
I have two sets of JSON data. I want to find the keys which are unique in one dataset and also keys which are missing in the same in comparison with the other dataset.
My first data set looks as below :
{
"iphone": {
"price" : "50",
"review" : "Good"
},
"desktop": {
"price" : "80",
"review" : "OK"
},
"laptop": {
"price" : "90",
"review" : "OK"
}
}
My second data set looks as below :
{
"tv": {
"price" : "50",
"review" : "Good"
},
"desktop": {
"price" : "60",
"review" : "OK"
}
}
Therefore, for the first data set (w.r.t second data set):
unique values will be : iphone and laptop
and missing values will be : tv
How can I find out this difference and show then in a table with columns like "uniq_value" and "missing_value"
I could only write the query up to this , but this is half part and not what I want:
index=product_db |
|eval p_name=json_array_to_mv(json_keys(_raw))
|eval p_name = mvfilter(NOT match(p_name, "uploadedBy") AND NOT match(p_name, "time")
| mvexpand p_name| table p_name
Thanks