Compare 2 JSON data?

I was working on JSON data. I want to know is there any library which can help me to compare JSON .
Json 1:
Json 2:

Both the JSON are the same, just the index of the objects are different.

No, the JSONs are different, as in a list order matters.

If your definition of equality is different, you need to implement that on your own.

In go-loke pseudo code it would roughly look like this:

func is_permutation([]map[string]string a, b) bool {
  for _, v := range a {
    if is_member(v, b) {
      delete_element(v, b)
    } else {
      return false
  return true

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.