Skip to content

Adding Array Data to Array Field Failing #93

Closed
@aminediab

Description

@aminediab

Hi Phill,
I have modified the diet plan class and added an ingredients array field, and successfully created the object. now when testing the add function I got an parse error on response with Unexpected token s in JSON at position 43, check the code below:

void addArray() async {
var list = ["sugar", "rice", "salt"];
var apiResponse = await DietPlan().getObject('j2S0JZhbpC');
if (apiResponse.success && apiResponse.result != null) {
var dietPlan = (apiResponse.result as DietPlan);
var response = await dietPlan.add('ingredients', list);
dietPlan.save();
} else {
print('ERROR');
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions