Open RomaSto opened 6 years ago
I had to wrap your data in an object and drop the trailing comma after Oberbrunner. I just used the cunningly-named { "stuff": <your array here> }
in this case. With that in place, here's what I got:
/stuff?q=Ondr
returns the two records you indicated./stuff?name=Ondr
only returns the former record, which is what it sounds like you would like.Seems like it's working as expected and you can just use the name property (or any other property that you want) instead of full text search.
I have data like: [ { "name": "Ondricka LLC", "id": "7257455862", "image": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Mauritius_Road_Signs_-_Mandatory_Sign_-_Compulsory_Round-about.svg/2000px-Mauritius_Road_Signs_-_Mandatory_Sign_-_Compulsory_Round-about.svg.png", "lastExecution": "2017-12-29T08:51:50.205Z", "duration": 63838, "locations": 17433, "link": "https://teagan.biz", "warnings": 81508, "errors": 76781, "status": "Disabled" }, { "name": "Ondr", "id": "7455943400", "image": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Mauritius_Road_Signs_-_Mandatory_Sign_-_Compulsory_Round-about.svg/2000px-Mauritius_Road_Signs_-_Mandatory_Sign_-_Compulsory_Round-about.svg.png", "lastExecution": "2017-08-10T05:49:20.775Z", "duration": 495, "locations": 54119, "link": "https://devonte.com", "warnings": 92119, "errors": 69269, "status": "Active" }, { "name": "Bahringer LLC", "id": "8781797582", "image": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Mauritius_Road_Signs_-_Mandatory_Sign_-_Compulsory_Round-about.svg/2000px-Mauritius_Road_Signs_-_Mandatory_Sign_-_Compulsory_Round-about.svg.png", "lastExecution": "2018-05-06T13:24:36.024Z", "duration": 28113, "locations": 81782, "link": "https://leanne.biz", "warnings": 79832, "errors": 56778, "status": "Active" }, { "name": "Oberbrunner LLC", "id": "3225738390", "image": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Mauritius_Road_Signs_-_Mandatory_Sign_-_Compulsory_Round-about.svg/2000px-Mauritius_Road_Signs_-_Mandatory_Sign_-_Compulsory_Round-about.svg.png", "lastExecution": "2017-12-02T07:40:31.604Z", "duration": 85941, "locations": 55081, "link": "http://hudson.name", "warnings": 30265, "errors": 42681, "status": "Active" }, ]
Can json server search it by name property? If I give it "Ondr" it returns "Ondr", "Ondricka LLC"