title: JSON array filter does not apply
body: <p>I am trying to filter the data from an array, but it is throwing an error saying</p>
  
  <blockquote>
    <p>filter() is not function</p>
  </blockquote>
  
  <p>Here is the code:</p>
  
  <pre><code>var selectedObject = [];
  selectedObject= JSON.stringify(formsDataSource.data());
  //console.log(selectedObject);
  
  //var filtered = $.grep(selectedObject, function (el) {
  //    return el.po_order_no = 18;
  //});
  //console.log((filtered));
  if (selectedObject == undefined) {
      alert("Undefined");
  } else {
      var data= selectedObject.filter(function (element) { return element.po_order_no = "18"; })
      alert("" + data);
  }
  </code></pre>
  
  <p>I tried many things but it is still throwing an error. Any help?</p>