Filtering JSON objects from array of values
You are basically making your object filtering into an \$0(m * n)\$ complexity function ( where \$m\$ is number of type id’s) that your are filtering against and \$n\$ is number of objects in the fetched result set.   This function should only be \$0(n)\$. 

To do this, make type id’s into a Set which allows \$O(1)\$ lookup and then use this Set to filter the fetched objects.

For example:

const typeIds = new Set([ /* ids here */ ]);
const isFilteredType = (element) =&gt; typeIds.has(element.type);

// and later when filtering results
.then( (out) =&gt; out.filter(isFilteredType) );


It is also customary in javascript to use lowercase first letter for variable names. Your code would look odd to most JS developer for this reason. 

There is really not much of a reason to use var in modern JavaScript.  You should primarily use const with let being used where the variable needs to be reassignable.

It is not really clear here why JSONpull and FilterJSON are even needed.