我有 json 在 php 中编码,它的输出是这样的。
[{"city":"Asasqewq"},{"city":"New Brunswick"},{"city":"Jersey City"},{"city":"Summit"},{"city":"Edison"},{"city":"Hillside"},{"city":"East Orange"}]
和
{"city":"New City 1"},{"city":"New City 2"}
如何将这 2 个 json 数据对象合并为这样的输出?
[{"city":"Asasqewq"},{"city":"New Brunswick"},{"city":"Jersey City"},{"city":"Summit"},{"city":"Edison"},{"city":"Hillside"},{"city":"East Orange"}, {"city":"New City 1"},{"city":"New City 2"}]