lloyd/JSONSelect — Issue #35: Wanted real path with dot-notation in JSONSelect.forEach callback
Author: extensible
Created: 2012-02-24 00:21:52+00:00
State: open

Hello there!
First of all, your project is awesome!

It would be great if you could add the real-path with dot-notation of matched values in place of second argument of callback in forEach-method.

For example, we have a JSON:
```javascript
var data = {
a: {x: 1, y: 2},
b: ["one", "two"]
};

JSONSelect.forEach('.a > number, .b :nth-child(1n)', data, function( value, path ){
// Here I would love to see:
// value - 1, path - "a.x"
// value - 2, path - "a.y"
// value - "one", path - "b.0"
// value - "two", path - "b.1"
});
```

Is it possible?
Thank you in advance.