title: how to replace the value in an JSON array for a existing key?
body: <p>In my application I have a ajax call and  am getting the following response based on this am constructing the questions &amp; answer section which I have included in the <a href="https://jsfiddle.net/we7r8ztv/27/" rel="nofollow noreferrer">JSFiddle</a></p>
  
  <pre class="lang-js prettyprint-override"><code>var responseQuestions = {
    "error": false,
    "message": "Success",
    "result": {
      "Questions": [{
          "Id": "131a",
          "Text": "In what county do you live?",
          "Answers": [{
              "Id": "abc1",
              "Text": "option1"
            },
            {
              "Id": "abc2",
              "Text": "option2"
            },
            {
              "Id": "abc3",
              "Text": "option3"
            },
            {
              "Id": "abc4",
              "Text": "option4"
            },
            {
              "Id": "abc5",
              "Text": "option5"
            }
          ],
          "SelectedAnswerId": null
        },
        {
          "Id": "132a",
          "Text": "Which zip code has ever been a part of your address?",
          "Answers": [{
              "Id": "def1",
              "Text": "option1"
            },
            {
              "Id": "def2",
              "Text": "option2"
            },
            {
              "Id": "def3",
              "Text": "option3"
            },
            {
              "Id": "def4",
              "Text": "option4"
            },
            {
              "Id": "def5",
              "Text": "option5"
            }
          ],
          "SelectedAnswerId": null
        },
        {
          "Id": "133a",
          "Text": "What was the original amount of your most recent mortgage?",
          "Answers": [{
              "Id": "ghi1",
              "Text": "option1"
            },
            {
              "Id": "ghi2",
              "Text": "option2"
            },
            {
              "Id": "ghi3",
              "Text": "option3"
            },
            {
              "Id": "ghi4",
              "Text": "option4"
            },
            {
              "Id": "ghi5",
              "Text": "option5"
            }
          ],
          "SelectedAnswerId": null
        }
      ]
    }
  };
  </code></pre>
  
  <p><strong>Required Format:</strong></p>
  
  <pre><code> var responseQuestions = {
    "error": false,
    "message": "Success",
    "result": {
      "Questions": [{
          "Id": "131a",
          "Text": "In what county do you live?",
          "Answers": [{
              "Id": "abc1",
              "Text": "option1"
            },
            {
              "Id": "abc2",
              "Text": "option2"
            },
            {
              "Id": "abc3",
              "Text": "option3"
            },
            {
              "Id": "abc4",
              "Text": "option4"
            },
            {
              "Id": "abc5",
              "Text": "option5"
            }
          ],
          **"SelectedAnswerId": "abc2"**
        },
        {
          "Id": "132a",
          "Text": "Which zip code has ever been a part of your address?",
          "Answers": [{
              "Id": "def1",
              "Text": "option1"
            },
            {
              "Id": "def2",
              "Text": "option2"
            },
            {
              "Id": "def3",
              "Text": "option3"
            },
            {
              "Id": "def4",
              "Text": "option4"
            },
            {
              "Id": "def5",
              "Text": "option5"
            }
          ],
          **"SelectedAnswerId": "def1"**
        },
        {
          "Id": "133a",
          "Text": "What was the original amount of your most recent mortgage?",
          "Answers": [{
              "Id": "ghi1",
              "Text": "option1"
            },
            {
              "Id": "ghi2",
              "Text": "option2"
            },
            {
              "Id": "ghi3",
              "Text": "option3"
            },
            {
              "Id": "ghi4",
              "Text": "option4"
            },
            {
              "Id": "ghi5",
              "Text": "option5"
            }
          ],
          **"SelectedAnswerId": "ghi2"**
        }
      ]
    }
  };
  </code></pre>
  
  <p>Now I need to submit this answer with the same above mentioned format along the "<strong>SelectedAnswerId</strong>" value(in the above mentioned array "<strong>SelectedAnswerId</strong>" is null and now I have to include the original selected ans Id based on questions ).</p>
  
  <p>I have tried to fetch all the selected ans id in a array and attached the same in jsfiddle but am unable to proceed on how to append this ans id in the existing array based on questions. How to achieve this ?</p>