Home » Javascript » sending a dictionary object to query a NOSQL database in sails

sending a dictionary object to query a NOSQL database in sails

Posted by: admin October 29, 2018 Leave a comment

Questions:

I am currently working on a small app in sails. I want to perform a query on my NOSQL database using the find() function. So I want to send the query from my view
( I generate this query based on a checkbox input from the user) and the query is a dictionary object. So my question is how to send this dictionary to my controller.

document.getElementById("dope").href = '/tweets/filter?fil='+ddict;
</script>
<td> <center><button type="button"><a id="dope">Submit</a></button> 
</center></td>
</tr>
</tbody>
</table>
</td>

Here ddict is my dictionary and I am sending it to my filter controller using a GET URL request. But this does not work.

Answers: