so im not sure what im doing wrong but im trying to check to see if one of the items in my get json list is in the url. This seems very easy but nothing is working for me.
$.getJSON("/extra/api/api/GetProductProgramList", function(data) {
this.name = data.SpecialtyName;
//updated not to confuse jquery with hash
this.hashtag = data.hashtag;
});
and then
if (currentLocation.indexOf(hashtag) >= 0) {
self.filterValues.push(name);
}
but i keep getting 0x800a1391 - JavaScript runtime error: 'hashtag' is undefined
UPDATE
example: my url looks like this: localhost/dvd/adventure
GetProductProgramList.json provides a list of specialties:
+---------------+-----------+
| specialtyname | hashtag |
+---------------+-----------+
| Adventure | adventure |
| Sci-Fi | sci-fi |
| Action | action |
| Fantasy | fantasy |
+---------------+-----------+
so im basically trying to find if the url contains and item from the json list. then pushing that name to my function.