Page 1 of 1

Is it possible to return 1-many field as array not object?

Posted: Thu Oct 25, 2018 5:54 am
by martinm
Hi,

Is it possible that I could define respond to return me 1-many field as an array not object?

Current respond:

Code: Select all

{
      "id": 12334,
      "owners": {
        "total": 1,
        "data": [
            {
                "id": 232,
                "firstName": "Martin",
                "lastName": "Thomas",
                "email": "@",
                "phone": "+01 1233455",
                "mobile": ""
            }
        ]
    },
}
Expected respond:

Code: Select all

{
      "id": 12334,
      "owners":  [
            {
                "id": 232,
                "firstName": "Martin",
                "lastName": "Thomas",
                "email": "@",
                "phone": "+01 1233455",
                "mobile": ""
            }
      ],
}
Thanks