Skip to main content
Version: Streamsheets 2.5

DICTIONARY

Creates a JSON Object using the given keys and values.

Syntax

=DICTIONARY(Range, [Horizontal])

Arguments

NameDescription
RangeRange providing the source data, that will be used for the JSON. The left or top cells will feed the keys and the bottom or right the values.
Horizontal (optional)FALSE, if keys are aligned vertical (Default), TRUE if horizontal.

Return

{ JSON } as a placeholder for a JSON object, if successful otherwise an Error Code.

Examples

FormulaResultComment
=WRITE(OUTBOXDATA("Message", "NewItem"), DICTIONARY(A2:B5), FALSE), "Dictionary") with the following cell content: 
Appending an object to a message. The message content will look as follows
=WRITE(OUTBOXDATA("Message", "NewItem"), DICTIONARY(A2:A5,FALSE),"DICTIONARY") 
=WRITE(OUTBOXDATA("Message","NewItem2"),
DICTIONARY(B2:B5,FALSE,TRUE),"Dictionary")