tettusud / merge-jsons-webpack-plugin

This plugin is used to merge json files into single json file,using glob or file names
https://npmjs.com/package/merge-jsons-webpack-plugin
Apache License 2.0
36 stars 20 forks source link

How do I prevent structural changes to the json? #3

Closed jbeckton closed 7 years ago

jbeckton commented 7 years ago

In my source json files I have an array of objects.

`"children": [
    {
      "role": "link",
      "title": "Sub One",
      "routerLink": "/spog-module-seed/sub-one"
    },
    {
      "role": "link",
      "title": "Sub Two",
      "routerLink": "/spog-module-seed/sub-two"
    }
]`

and the result becomes

`"children": {
      "0": {
        "role": "link",
        "title": "Sub One",
        "routerLink": "/spog-module-seed/sub-one"
      },
      "1": {
        "role": "link",
        "title": "Sub Two",
        "routerLink": "/spog-module-seed/sub-two"
      }
}`

is there a way to influence this behavior so the output contains and array of objects?

tettusud commented 7 years ago

Thank you @jbeckton for trying the plugin , I have fixed the issue you can download the latest version 1.0.4 By the way you can also try running the sample ,I have added new folders under example/jsons/arrays ,which explains your scenerio