hbi99 / defiant.js

http://defiantjs.com
GNU Affero General Public License v3.0
913 stars 91 forks source link

return the index of the results #99

Closed mejuliver closed 6 years ago

mejuliver commented 6 years ago

is there a way I could get the index of the return results? this

JSON.search($data, '//*[contains(keyword, "digital")]');

returns only the found item. Any ideas, help please?

hbi99 commented 6 years ago

Hi @mejuliver, I guess you mean the index of the found item in its position among its siblings (and related information). This is currently not supported but I am thinking about it. I'll get back to you if/when it will be implemented.