how to search an array of objects
with an array of objects how would you check a string within the array
- function AttributeNodeClass(name, type, klass, description, controls) {
- this.name = name
- this.type = type
- this.class = klass
- this.description = description
- this.controls = controls
- this.dump = function(){
- console.log(this)
- }
- }
- function ANCList() {
- var list = []
- this.add = function (attributeNodeClass) {
- list.push(attributeNodeClass)
- return this
- }
- this.dump = function () {
- $.each(list, function (i, anc) {
- anc.dump()
- })
- return this
- }