Skip to content

How to create a JSON array #125

Open
@carefree666

Description

Desired results:
[{"id":"1","name":"test"}]

Results obtained now:
[{"id":"1","name":"test"},{"id":"1","name":"test"}]

code

jsonArray := gabs.New() jsonArray.Set("1", "id") jsonArray.Set("test", "name") jsonArray.ArrayAppend(jsonArray.Data())

No relevant information was found. Please share a solution

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions