I'm starting from a jQuery wrapper with a number of <A>-tag elements in it. The result I want is:
[{href: "http://...", text: "The inner text"}, {...}, ...]
Thus far I got this:
_.map($pubs, ($pub) => _.pick($pub, 'href', 'innerText'))
That works, but it looks like there's a better way, and the inner text property is named "innerText" instead of "text". And I do want the innerText of the elements and not just the .text() as that doesn't clean up the output (newlines, whitespace,...).