given string is
var strg = "RoomItemsQuantity[items][1][itemId]"
I'm having the above string value.How can i get itemId from the string.
var index = strg.lastIndexOf("[");
var fnstrg = strg.substr(index+1);
var fnstrg = fnstrg.replace("]","");
I've done like this is there any easiest way to do this?
thanks,
[1]portion fixed..?itemIdpart of the string or you are showing that as a placeholder for some value?