How to send arrays of inputs in the backend?

Hey, guys,

I have a question, I believe it is very easy, but I have never worked with arrays in api.

I have an api where I need to send an array of names, I’m using an input called names and in the api I do the split where I break it at the commas, transforming it into an array, so far everything is fine, but when I send the empty input because I’m transforming it into a split, it sends the parameter " " double quotes but I need to send the empty array without quotes inside it, is there any better way to work with arrays coming from an input?


Check the length of the input, if it’s 0, then create an empty array/list, else do the split

You’re welcome