From 697deb5d5388e34d324f0f078154e161a0530c39 Mon Sep 17 00:00:00 2001 From: Jonathan Stewmon Date: Thu, 15 Sep 2016 10:07:24 -0500 Subject: [PATCH] rename to_object to from_items --- docs/specification.rst | 50 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/specification.rst b/docs/specification.rst index 1f276a6..676c063 100644 --- a/docs/specification.rst +++ b/docs/specification.rst @@ -1324,6 +1324,31 @@ If you would like a specific order, consider using the ``sort_by`` function. - ``[["z", "last"], ["b", "second"]]`` +.. _func-from-items: + +from_items +--------- + +:: + + object from_items(array[array[any]] $arg) + +Returns an object from the provided array of key value pairs. This function +is the inverse of :ref:`func-items`. + +.. cssclass:: table + +.. list-table:: Examples +:header-rows: 1 + + * - Given + - Expression + - Result + * - ``[["one", 1], ["two", 2]]`` + - ``from_items(@)`` + - ``{"one": 1, "two": 2}`` + + .. _func-join: join @@ -1884,31 +1909,6 @@ to_array - ``[{"foo": "bar"}]`` -.. _func-to-object: - -to_object ---------- - -:: - - object to_object(array[array[any]] $arg) - -Returns an object from the provided array of key value pairs. This function -is the inverse of :ref:`func-items`. - -.. cssclass:: table - -.. list-table:: Examples - :header-rows: 1 - - * - Given - - Expression - - Result - * - ``[["one", 1], ["two", 2]]`` - - ``to_object(@)`` - - ``{"one": 1, "two": 2}`` - - .. _func-to-string: