How to get multiple JSON objects using nodejs and mongoose?

前端 未结 2 1203
小鲜肉
小鲜肉 2021-01-27 13:25

I want to get all the JSON objects having season:2008 or season:2009. For season field there are 2008,2009,2010,2011,2012,2013,2014,2015,2016 values.

2条回答
  •  渐次进展
    2021-01-27 13:58

    Before http://localhost:5000/api/matches/2010 before the /api/matches/:season there should be a route name. Lets say your route name is match.js you the url would look like http://localhost:5000/match/api/matches/2010. Depends how you defined the index.js

提交回复
热议问题