Server layer will return a list of String value, like
{"Bob", "Charlotte", "Johnson", "David"...}
Now we need the List String to be a Json object to push to front end, like
[{id: "Bob"}, {id: "Charlotte"}, {id: "Johnson"}, {id: "David"...}]
or
[{name: "Bob"}, {name: "Charlotte"}, {name: "Johnson"}, {name: "David"...}]
Any label is fine, we just need a label to make it as JSON object. Does Jackson has something to convert List of String by default i.e. {string: "Bob"}? That will be really sweet......
name(oridor whatever) property.lengthand everything. You can do the normal for loop and reference it viaresultArray[index].