Skip to content

Instantly share code, notes, and snippets.

@kitcat-dev
Created March 19, 2019 10:51
Show Gist options
  • Select an option

  • Save kitcat-dev/edc9ffd861cf39fa2eef0bc345ad5c52 to your computer and use it in GitHub Desktop.

Select an option

Save kitcat-dev/edc9ffd861cf39fa2eef0bc345ad5c52 to your computer and use it in GitHub Desktop.
/**
* Получает значения всех вложенных объектов из объекта со вложенными массивами и объектами
* @param {Object} obj - Корневой объект
* @returns {Array} Возвращает массив путей ко всем примитивам, вложенным в объект, вместе с путем до них
* @example
* // 'baz', 'foo', ''
* rootObject: {
* 30: { value: "baz" }
* 31: [ [ { value: "foo" } ], [ { value: "" } ] ]
* }
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment