Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

JsonNodeIterator - hasNext()

JsonNodeIterator - hasNext()

Determines if there is another property available.

This method is available only in an Edge Encryption rule action script.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean True if another property is available.

This example is from the REST JSON encryption rule.

function RESTJSONAction(request) {
	var urlArray = request.path.split('/');
    var tableName = urlArray[urlArray.length - 1];
	
	if (request.urlParams && request.urlParams.sysparm_query) {
		request.urlParams.sysparm_query.encodedQueryFor(tableName);
	}
	
	var jsonContent = request.getAsJsonContent();
	for (var jsonElementItr = jsonContent.iterator(); jsonElementItr.hasNext(); ) {
		var jsonElement = jsonElementItr.next();
		jsonElement.valueFor(tableName, jsonElement.getName());			
	}
}

This site is scheduled for a small content update on Monday, November 19th, between the hours of 3:30pm and 5:00pm Pacific Time (Nov 19 23:30 – Nov 20 1:00 UTC). Acces to this site may be slightly delayed during that time.