demo/extract.html in soaspec-0.2.15 vs demo/extract.html in soaspec-0.2.16

- old
+ new

@@ -8,33 +8,27 @@ <h1>Extract from response</h1> <div ng-app="codeDemo" ng-controller="extract"> <p> <b>Sample response</b> - <p> - {"root": - {"parent1": - {"child1":5,"child2":"parent1 word"}, - "parent2": - {"uniq":"val","child2":"word2"}} - } + <p> {{ sampleData }} </p> </p> <p>Method: <select ng-model="index"> - <option value="0" selected="selected">Unique element from body</option> - <option value="1">Element from body via JSONPath</option> - <option value="2">List of values matching JSONPath</option> + <option ng-repeat="option in myData" value="{{$index}}">{{option.desc}} + </option> </select> </p> - <p ng-bind="myData[index].method"></p> - <p ng-bind="myData[index].result"></p> + <p>Code: {{ myData[index].method }}</p> + <p>Result: {{ myData[index].result }} </p> </div> <script> var app = angular.module('codeDemo', []); app.controller('extract', function($scope, $http) { $http.get("extract.json").then(function(response) { - $scope.myData = response.data; + $scope.myData = response.data.methods; + $scope.sampleData = response.data.sampleData; }); }); </script> </body> </html> \ No newline at end of file