I have an array in the object that contain class names of an HTML element.now i want a particular class name from an array and want to store in some variable but i don't know full class name.so how can i achieved this.
var arr = ["tile", "tile-2", "tile-new", "tile-position-1-4", value: "tile tile-2 tile-new tile-position-1-4"];
So here i need tile-position-1-4 to be get fetch from array and store in some variable and i only know about class name starts with tile-position.
my object structure is like this.
var obj={
tile-position:""
}
the tile-position-1-4 keeps getting updated so i dont know last numbers but what i know is that it starts with tile-position-[1-4]-[1-4].
arrayandobjectstructures wrong. Can you please check those. That array is not the array of objects you are talking about