[Vuejs]-Node – Express converting array to "Object" Map

0πŸ‘

βœ…

The problem is that you are sending your data as a querystring but what you need is json. Parsing querystring that holds an array will return an object instead of an array.

All you need is to add a json datatype to $.post

So try this

$.post('/MyApp/api/users/createUser',body, 'json')

Leave a comment