I have two json files with content like following :
File1 :
{
"name": "SES_ENABLED",
"value": "true"
},
{
"name":"SES_ADDRESS",
"value":"email-xxxxxx.aws.com"
},
{
"name":"SES_FROM_EMAIL",
"value":"abc@gmail.com"
},
{
"name":"SES_TO_EMAIL",
"value":"123@gmail.com"
}
File 2:
{
"name": "SES_ENABLED",
"value": "false"
},
{
"name":"SES_FROM_EMAIL",
"value":"xyz@gmail.com"
},
{
"name":"SES_ADDRESS",
"value":"emails-xyzyzyz.aws.com"
}
In the above two files the name variable will be same but the values are different and the ordering is different and also there is an extra field in file 1
i.e
{
"name": "SES_TO_EMAIL"
"value": "123@gmail.com"
}
From file1 how can i compare file2 for common "name" variables present and also if any field is missing in file2 than file1, how can I get that.
For example:
After comparing file1 to file2 , I need to get output like "name": "SES_TO_EMAIL"
is not present in file2.
Any solution will be very useful.
Thanks in Advance :)