Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 652 Bytes

get_json.md

File metadata and controls

24 lines (20 loc) · 652 Bytes

Rx.DOM.Request.getJSON(url)

# [Ⓣ][1]

Creates an observable sequence from JSON from an Ajax request.

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.DOM.Request.get('/products')
	.subscribe(
		function (data) {
			// Log data length
			console.log(data.length);
		},
		function (err) {
			// Log the error
		}
	);