Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Latest commit

 

History

History
47 lines (36 loc) · 1.75 KB

getjson.md

File metadata and controls

47 lines (36 loc) · 1.75 KB

Rx.DOM.getJSON(url)

Creates an observable sequence from JSON from an Ajax request. This is just a shortcut to the Rx.DOM.ajax method with the GET method and parsing the responseText as JSON.

Arguments

  1. url (String): A string of the URL to make the Ajax call.

Returns

(Observable): The observable sequence which contains the parsed JSON.

Example

Rx.getJSON('/products')
  .subscribe(
    function (data) {
      // Log data length
      console.log(data.length);
    },
    function (err) {
      // Log the error
    }
  );

Location

File:

Dist:

Prerequisites:

NPM Packages:

NuGet Packages:

Unit Tests: