[#nlohmann-basic_json-0c-array]
= xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-0c.adoc[basic&lowbar;json]::array
:relfileprefix: ../../
:mrdocs:

explicitly create an array from an initializer list

== Synopsis

Declared in `&lt;nlohmann&sol;json&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
static
xref:nlohmann/basic_json-0c.adoc[basic&lowbar;json]
array(xref:nlohmann/basic_json-0c/initializer_list_t.adoc[initializer&lowbar;list&lowbar;t] init = &lcub;&rcub;);
----

== Return Value

a JSON array value with the elements from _init_

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *init*
| initializer list with JSON values to use for the array
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
