03-06-2022 04:36 PM
Hello Experts.
i want to filter json object based on keys present in another object of same document.
I have one json object which hold key information.
As end result we should consider only those values which has key value matching with json object which hold key information.
group object holds key information.
i should only consider value matching with key values from group object.
Regards,
Ajay
input_doc.txt (1.2 KB)
03-07-2022 01:47 AM
Hi @Ajay_Chawda
Try to use the following expression and let me know if this helps you
$.entries().filter(item => $group.findIndex(x => x.name == item[0]) != -1 ).reduce((acc, cur) => acc.extend({[cur[0]]: cur[1]}),{})
BR
Kristijan
03-09-2022 07:56 PM
@Cele
Thank you for help.
it worked .
Regards,
Ajay