I am currently working with mongoose and have a model called tickets.
The model includes instructions for: Fromticket, Number default 0 Toticket, number, default 0
For example, if I have the following rows:
{fromticket:1 , toticket:3000},
{fromticket:3001 , toticket:29000}
,
How can I search for the row that contains a specific ticket number such as 20000 or 3001? (In this case, it would be row number 2)
Tickets.find( row where owner is ticket 2000)