diff --git a/data/testing/appendArray_objects/animalsObjects.json b/data/testing/appendArray_objects/animalsObjects.json index a9d94a6..7046d40 100644 --- a/data/testing/appendArray_objects/animalsObjects.json +++ b/data/testing/appendArray_objects/animalsObjects.json @@ -4,5 +4,6 @@ {"animal": "cat"} ], "others": {"animal": "human"}, - "fictional": {"animal": "unicorn"} + "fictional": {"animal": "unicorn"}, + "exstinct": {"animal": "dodo"} } \ No newline at end of file diff --git a/data/testing/appendArray_objects/expected_object.json b/data/testing/appendArray_objects/expected_object.json index b9c62e4..13cf3ee 100644 --- a/data/testing/appendArray_objects/expected_object.json +++ b/data/testing/appendArray_objects/expected_object.json @@ -1,10 +1,25 @@ { - "animals":[ - {"animal": "dog"}, - {"animal": "cat"}, - {"animal": "human"}, - {"animal": "unicorn"}, - {"animal": "earthworm"} + "animals": [ + { + "animal": "dodo" + }, + { + "animal": "dog" + }, + { + "animal": "cat" + }, + { + "animal": "human" + }, + { + "animal": "unicorn" + }, + { + "animal": "earthworm" + } ], - "others": {"animal": "human"} + "others": { + "animal": "human" + } } \ No newline at end of file diff --git a/data/testing/appendArray_objects/result_object.json b/data/testing/appendArray_objects/result_object.json index 31aefed..e1885b6 100644 --- a/data/testing/appendArray_objects/result_object.json +++ b/data/testing/appendArray_objects/result_object.json @@ -8,5 +8,8 @@ } ], "others" : { "animal" : "human" + }, + "exstinct" : { + "animal" : "dodo" } } diff --git a/data/testing/appendArray_objects/test_append_object.fix b/data/testing/appendArray_objects/test_append_object.fix index f7bea09..83c4abf 100644 --- a/data/testing/appendArray_objects/test_append_object.fix +++ b/data/testing/appendArray_objects/test_append_object.fix @@ -2,4 +2,6 @@ copy_field("others", "animals[].$append") move_field("fictional", "animals[].$append") -add_field("animals[].$append.animal", "earthworm") \ No newline at end of file +add_field("animals[].$append.animal", "earthworm") + +copy_field("extinct", "animals[].$prepend") \ No newline at end of file