Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Unfortunately Object keys are not equivalent to Array keys, in one very important aspect: Order is not preserved when dealing with Object keys.</p> <p>One way to accomplish what you are trying to do is:</p> <pre><code>var resultFeed = feedResult.feed.entries.map( function(entry){ delete entry.category; delete entry.content; delete entry.contentSnippet; return entry; }) </code></pre> <p>With regard to the IE compatability issue the following is from the <a href="https://developer.mozilla.org/en-US/docs" rel="nofollow">MDC documentation</a> on the subject.</p> <h2>Compatibility</h2> <p>map is a recent addition to the ECMA-262 standard; as such it may not be present in other implementations of the standard. You can work around this by inserting the following code at the beginning of your scripts, allowing use of map in implementations which do not natively support it. This algorithm is exactly the one specified in ECMA-262, 5th edition, assuming Object, TypeError, and Array have their original values and that fun.call evaluates to the original value of Function.prototype.call. </p> <pre><code>if (!Array.prototype.map) { Array.prototype.map = function(fun /*, thisp */) { "use strict"; if (this === void 0 || this === null) throw new TypeError(); var t = Object(this); var len = t.length &gt;&gt;&gt; 0; if (typeof fun !== "function") throw new TypeError(); var res = new Array(len); var thisp = arguments[1]; for (var i = 0; i &lt; len; i++) { if (i in t) res[i] = fun.call(thisp, t[i], i, t); } return res; }; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload