title: How to compare two JSON string in flutter?
body: <p>I have two long JSON string and what I need is compare these strings and find if they are equals or not, if it's not equal I can get list1 which contains (JSON1-JSON2) and list2 contains (JSON2-JSON1)</p>
  
  <p>I find this ( <a href="https://github.com/google/dart-json_diff" rel="nofollow noreferrer">https://github.com/google/dart-json_diff</a> ) but it's very annoying and I don't know how to use this</p>
  
  <p>I mean something like this</p>
  
  <pre><code>        final json1 = await http.get('https://jsonplaceholder.typicode.com/posts');
          final json2 = await http.get('https://jsonplaceholder.typicode.com/posts');
  
          var list1= compare(json1,json2);
          var list2= compare(json2,json1);
  
      List&lt;dynamic&gt; compare (List&lt;dynamic&gt; json1,List&lt;dynamic&gt; json1){
      .
      .
      code?
      .
      .
      return results;
      }
  /////////////////
      json1=[
        {
          "userId": 1,
          "id": 1,
          "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
          "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
        },
        {
          "userId": 1,
          "id": 2,
          "title": "qui est esse",
          "body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non debitis possimus qui neque nisi nulla"
        },
        {
          "userId": 1,
          "id": 3,
          "title": "ea molestias quasi exercitationem repellat qui ipsa sit aut",
          "body": "et iusto sed quo iure\nvoluptatem occaecati omnis eligendi aut ad\nvoluptatem doloribus vel accusantium quis pariatur\nmolestiae porro eius odio et labore et velit aut"
        },
      ]
  /////////////////
      json2=[
        {
          "userId": 1,
          "id": 1,
          "title": "sunt aut facere repellat ",
          "body": "quia et suscipit\nsuscipit recusandae"
        },
        {
          "userId": 1,
          "id": 2,
          "title": "qui est esse",
          "body": "est rerum tempore vitae\nsequi "
        },
        {
          "userId": 1,
          "id": 3,
          "title": "ea molestias quasi",
          "body": "et iusto sed quo iure\nvoluptatem occaecati"
        },
        {
          "userId": 1,
          "id": 4,
          "title": "qui est esse",
          "body": "est rerum tempore vitae\nsequi "
        },
      ]
  //////////
  list1=[
            {
              "userId": 1,
              "id": 4,
              "title": "qui est esse",
              "body": "est rerum tempore vitae\nsequi "
            },
         ]
  </code></pre>
  
  <p>thank u</p>