Webform submitted data field names I am beginning a module which implements the hook_webform_submission_insert. I am successfully getting the following data from my implementation of that hook:

stdClass Object
(
    [nid] =&gt; 3401
    [uid] =&gt; 1
    [submitted] =&gt; 1425491295
    [remote_addr] =&gt; http://myserver.com
    [is_draft] =&gt; 0
    [data] =&gt; Array
        (
            [2] =&gt; Array
                (
                    [value] =&gt; Array
                        (
                            [0] =&gt; Chandler Mann
                        )

                )

            [3] =&gt; Array
                (
                    [value] =&gt; Array
                        (
                            [0] =&gt; tecutij@yahoo.com
                        )

                )
.
.
.


I need to write code to programmatically map each value index to node fields in a process of creating nodes from custom code.

However, as the output above does not have field names, it's difficult to map correctly to the necessary node fields.

Can anyone advice how I might discover what name webform assigns to the field#id 2, 3 etc as in my code sample above?
The $node argument to hook_webform_submission_insert() contains the info you're looking for. For a Webform node, you'll find an array $node-&gt;webform-&gt;components where, for example, $node-&gt;webform-&gt;components[2] would correspond to the item whose value is "Chandler Mann" in your data.