skip to Main Content

Json – Selecting elements with querySelector

<div id="~" class="dm-post-0 well clearfix post listview" data-identifier="~" data-relative="https://url_that_i_want_to_capture" data-feed="~"> let convertEntries = () => { "use strict"; let target = [...document.getElementsByClassName("listview")]; let result = []; target.forEach((element) => { result.push({ title: element.querySelector(".list-header strong").textContent, url: element.querySelector("#listview").dataset.relative, }); }); return result; };…

VIEW QUESTION
Back To Top
Search