jsonld-extract
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

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);

Package Sidebar

Install

npm i jsonld-extract

Weekly Downloads

107

Version

0.0.8

License

MIT

Unpacked Size

6.89 kB

Total Files

4

Last publish

Collaborators

  • gaetanlegac