Below, you can find a screenshot from the "selected"-Object, i am using. It is a select-list. I receive the object with following code (using jQuery):
var addArticle = $('.add-article'); // div.add-article
// selector is a dynamic value, that defines, which select-list should be "found"
var select = addArticle.find('[data-id=' + selector + ']');
The object-selection works fine. But when i want to get the data-attribute values (values are numbers), i fail to get them.
i tried many variations to get the values, but here is an example of it
//$this.selectors is an array with all values beween data- and -id
$.each($this.selectors, function (i, el) {
//return if last needed data attribute was read
if (i == $this.lastAsInt) {
return false;
}
// "generate" data-selector
selector = '[data-' + el + '-id]';
// select = object from the image (see link), also tried with data()
location[el] = select.find(':selected').find(selector);
});
I hope, someone could understand my problem :)

dataattribute you build inselector, then you need to wrap it in[]like this:selector = '[data-' + el + '-id]';. If that isn't what you need, the please edit your question to make it what you're trying to do much clearer