I am trying to get the \"imdb rating\" using express in node and I am struggling.
movies.json
[{
\"id\": \"3962210\",
\"order\": [4.
this works, you have to convert it to a string: threeFunction().toString() or x1.toString()
Integer is not valid for res.send() so convert it to string.
res.send(value.toString())
According to Express res.send([body]) docs:
The body parameter can be a Buffer object, a String, an object, or an Array
You can't send a number by itself.
Try either converting the number to a string
res.send(''+result.rows[0].doc.imdb.rating);
or send it as an object value
res.send({ result: result.rows[0].doc.imdb.rating});