javascript - Join two objects in AngularJs -
i need join 2 json object using angularjs.
my object example:
{ "details1" : [ { "details1id" : 119, "details1title" : "title1", "details1description" : "description1" } ], "details2" : [ { "details2id" : 150, "details2title" : "title2", "details2description" : "description2" } ] }
i have objcet need join details2 details1
i need result in following manner. possible angularjs ? please suggest
{ "details1" : [ { "details1id" : 119, "details1title" : "title1", "details1description" : "description1" } ,{ "details2id" : 150, "details2title" : "title2", "details2description" : "description2" }] }
you may try this,
$scope.jsonarray['details1'].push($scope.jsonarray['details2'][0])
where $scope.jsonarray
variable storing json, may use other variable.
Comments
Post a Comment