Contributions
Re: Compare 2 JSON responses for duplicate property value
Hirichiethanks. I'll wait for your script thatnmraoshared with you. I will also update the title once I got this sorted if that's what you meant :). Apprecaite both for your assistance. Regards3 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.3KViews0likes0CommentsRe: Compare 2 JSON responses for duplicate property value
Any "ReferenceNumber" value should not be in common across both the JSON files. In the attached JSON files, I have property "ReferenceNumber" value in JSON1 node1 same as JSON2 node0, that needs to be flagged. Does not matter if other propertieshave duplicate values, butReferenceNumber should not be duplicate at all across the JSON1 and also in JSON2. Regards3 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.3KViews0likes7CommentsRe: Compare 2 JSON responses for duplicate property value
Thanks a lot for thisnmrao. The script will obviously help me in identifying duplicate reference numbers in individual JSON response. However, I'm looking for any "ReferenceNumber" value in JSON1 is not matching in JSON2 and vise versa. In other words none of the reference numbers in JSON1 should match with any of the reference numbers in JSON2. Sorry for the confusion.3 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.3KViews0likes11CommentsRe: Compare 2 JSON responses for duplicate property value
Thanks nmrao I have now attached two JSON files that would provide some idea for the structure. In these two JSON files I'm looking for duplicate values for property - "ReferenceNumber". Ideally these JSON responses Im thinking will not be saved as files to be compared, but any way we can use groovy to read the responses and find the duplicate values for property "ReferenceNumber"3 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.3KViews0likes13CommentsCompare 2 JSON responses for duplicate property value
Hi, I have two JSON responses that will have dynamic nodes on each request, but same structure and properties. I need to identify if a givenproperty has no duplicate values found in both the JSON responses via groovy. Appreciate you help. Thanks Example below. ID-424 in JSON1 & 2 are matching. JSON1 { "Name" : "Name1", "Age" : "25", "DateOfBirth" : "01012000", "ID" : "453" }, { "Name" : "Name2", "Age" : "25", "DateOfBirth" : "01012000", "ID" : "424" } JSON2 { "Name" : "Name3", "Age" : "21", "DateOfBirth" : "01012000", "ID" : "424" }, { "Name" : "Name4", "Age" : "25", "DateOfBirth" : "01012000", "ID" : "412" }Solved4KViews0likes15Comments