usman07 Posted March 9, 2012 Share Posted March 9, 2012 Can this be done with Javascript? How difficult is it? i basically want filter for depending on the different types of properties. e.g detached/semi detached/flats/apartments. how would i go about doing this? any help is appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/258603-how-to-filter-object-array-based-on-attributes/ Share on other sites More sharing options...
ignace Posted March 10, 2012 Share Posted March 10, 2012 var props = [], i = proplist.length; while (i--) { if (proplist[i].someproperty == 'somepropertyvalue') { props.push(proplist[i]); // valid } } Quote Link to comment https://forums.phpfreaks.com/topic/258603-how-to-filter-object-array-based-on-attributes/#findComment-1325772 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.