Class SpreadFunction


  • public class SpreadFunction
    extends FunctionBase
    From http://docs.jsonata.org/object-functions.html $spread(object) Splits an object containing key/value pairs into an array of objects, each of which has a single key/value pair from the input object. If the parameter is an array of objects, then the resultant array contains an object for every key/value pair in every object in the supplied array.
    • Field Detail

      • ERR_BAD_CONTEXT

        public static String ERR_BAD_CONTEXT
      • ERR_ARG1BADTYPE

        public static String ERR_ARG1BADTYPE
      • ERR_ARG2BADTYPE

        public static String ERR_ARG2BADTYPE
      • ERR_ARG1_MUST_BE_ARRAY_OF_OBJECTS

        public static String ERR_ARG1_MUST_BE_ARRAY_OF_OBJECTS
    • Constructor Detail

      • SpreadFunction

        public SpreadFunction()
    • Method Detail

      • addObject

        public com.fasterxml.jackson.databind.node.ArrayNode addObject​(com.fasterxml.jackson.databind.node.ArrayNode result,
                                                                       com.fasterxml.jackson.databind.node.ObjectNode obj)
      • spread

        public com.fasterxml.jackson.databind.JsonNode spread​(com.fasterxml.jackson.databind.node.ArrayNode result,
                                                              com.fasterxml.jackson.databind.JsonNode argObject,
                                                              boolean[] argIsArray)