ng-jsonpath

An angularjs module wrapper for jsonpath

Added by: Sam Deering

GitHub

Repository

noherczeg/ng-jsonpath

Stats

Stars: 0

Watchers: 0

Forks: 0

Module Description

Built with Grunt Build Status

ng-jsonpath

An angularjs module wrapper for jsonpath

Installing

Install via bower

bower install ng-jsonpath

Require it into your application (after Angular)

<script src="ng-jsonpath.min.js"></script>

Add the module as a dependency to your app

var app = angular.module('youOwnApp', ['ngJSONPath']);

And inject it into your controller like so!

(function () {
    'use strict';

    angular
        .module('app.module')
        .controller('myController', myController);

    myController.$inject = ['jsonPath'];

    function myController(jsonPath) {
        /*jshint validthis:true */
        var vm = this;
        var json = {/**/};

        vm.cheapBooks = jsonPath(json, '$..book[?(@.price<10)]');
    }

})();

For additional examples please check the test folder!

Module stats last updated: 2015-04-19 02:41:58

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!