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.
url(String): A string of the URL to make the Ajax call.
(Observable): The observable sequence which contains the parsed JSON.
Rx.getJSON('/products')
.subscribe(
function (data) {
// Log data length
console.log(data.length);
},
function (err) {
// Log the error
}
);File:
Dist:
Prerequisites:
- If using
rx.js rx.lite.js|rx.lite.compat.js
NPM Packages:
NuGet Packages:
Unit Tests: