So the console.log part is just to make it easier for me to see the output before I implement this piece of code into my overall solution. I read on stack overflow that you select the data attribute in this way:
$("li[data-city*=New York]")
But say for instance I want to select all my data attributes which look like this in my html:
data-group='value'
So then once I have selected these data attributes, how would I console.log the actual string value part of the data-group attribute.
It may seem like a basic question but a even a simple short answer would help greatly. Regards :)
$("li[data-city*=New York]").attr('data-group')