Skip to content
Advertisement

How to concatanate 2 dictionaries in 2 json files

Iam trying to append a dictionary in one json file to a dictionary in another json file. here are json file r1

JavaScript

json file r2

JavaScript

The result Iam looking for is Expected result

JavaScript

My code is not returning the expected results

JavaScript

Advertisement

Answer

As the ‘Adrian shum’ said your json having the lists. in that case you can use nested for loops.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement