Comparison of JSON objects

Solution

define(['underscore'],
(_) => {
//expResponse and slResponse are JSON array of objects
const compare=(expResponse,slResponse)=>
{
    return _.isEqual(expResponse,slResponse)
}
});
//to use this isEqual function define them by using library 'underscore'
//here it returns true if all key value pairs match with the other object

		

Leave a comment

Your email address will not be published. Required fields are marked *