0.0.8 • Published 3 years ago

jsonld-extract v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Json-LD Extractor

A damn simple tool to extract json-ld metadata from webpage using jquery like api (jQuery, Cheerio, CashDom ...).

npm

Installation

npm install --save jsonld-extract

Tested APIs

  • jQuery
  • Cheerio
  • CashDom

Usage example (Nodejs)

import jsonldextract from 'jsonld-extract';
import cheerio from 'cheerio';

const $ = cheerio.load( html );
const $jsonld = jsonldextract($);

const data = $jsonld('product.name');

console.log('Extracted data:', data);