# Fix pushToParent to work for arrays of Objects · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/8d54cbb834ab606ecfe23c6514cbac699319f60c)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 8d54cbb834ab606ecfe23c6514cbac699319f60c

Requested commit: 8d54cbb834ab606ecfe23c6514cbac699319f60c

Commit: 8d54cbb834ab606ecfe23c6514cbac699319f60c

Tree: 1b60a2ecdb86c497b3ab4cfe589d29f66a6e1985

Author: Wink Saville

Committer: Wink Saville

## Message

```
Fix pushToParent to work for arrays of Objects

The reference `*array` is a copy of the value on the stack. Instead use
a reference to top of stack. This is the same technique used above for
`var object` in `Value.String`.

Added two simple tests.

```

## Parents

- [e9b47d960b81dfc1fd70c5ae663b4b692ab0b19d](https://git.cafe/gitcafe/zig/commit/e9b47d960b81dfc1fd70c5ae663b4b692ab0b19d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/8d54cbb834ab606ecfe23c6514cbac699319f60c?format=markdown)
