Top "Flatten" questions

Flattening refers to either reducing a multi-dimensional array to a single dimension or to reducing a class and class methods to handle based function calls.

Un-optioning an optioned Option

Say I have a val s: Option[Option[String]]. It can thus have the following values: Some(Some("foo")) Some(…

scala join option monads flatten
How can I "merge", "flatten" or "pivot" results from a query which returns multiple rows into a single result?

I have a simple query over a table, which returns results like the following: id id_type id_ref 2702 5 31 2702 16 14 2702 17 3 2702 40 1 2703 23 4 2703 23 5 2703 34 6 2704 1 14 And …

sql sybase pivot flatten
Flatten nested JSON using jq

I'd like to flatten a nested json object, e.g. {"a":{"b":1}} to {"a.b":1} in order to digest it …

json elasticsearch solr jq flatten
PHP Laravel 5.5 collections flatten and keep the integer keys?

I have the following array : $array = [ '2' => ['3' => ['56' => '2'], '6' => […

php laravel flatten collect
3D array (1D flat) indexing

I am using a coordinate system x (width), y (height), z (Depth) Just to clear confusion if there is any …

java arrays multidimensional-array 3d flatten