1

I am trying to merge two JSON data .
example : json 1 :

{
      "countryCode":"AD",
      "countryName":"Andorra",
      "currencyCode":"EUR"
   },
   {
      "countryCode":"AE",
      "countryName":"United Arab Emirates",
      "currencyCode":"AED"
   }

json 2 :

{
      "code":"AED",
      "name":"Arab Emirates Dirham",
      "locale":"ar_AE",
      "display":1
   },
   {
      "code":"AFN",
      "name":"Afghanistan Afghani",
      "locale":"ps_AF",
      "display":1
   }

I want to merge this two json object based on the data .

1
  • I want to display country name and corresponding currency value using the currency code . Commented Nov 26, 2015 at 11:58

1 Answer 1

0

Use angular.extend function:

angular.extend(json1, json2);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.