# Re: I need array of hashes help

```On 2019-12-03 02:39, ToddAndMargo via perl6-users wrote:
```
`Hi All,`
```
What am I doing wrong here?

```
\$ p6 'my @y; my %x=(a=>"aa", b=>"bb"); @y[0] = %x; %x<a>="AA"; %x<b>="BB"; push @y,{%x}; for @y.kv -> \$I, \$J { say "Index \$I  \$J<a> \$J<b>" }; say "elements " ~ @y.elems;'
```
Index 0  AA  BB
Index 1  AA  BB
elements 2

It should be

Index 0  aa  bb
Index 1  AA  BB
elements 2

Many thanks,
-T
```
```
okay, I got this far:

```
\$ p6 'my @y; push @y, {a=>"aa",b=>"bb"}; push @y, {a=>"AA",b=>"BB"}; for @y.kv -> \$I, \$J { say "Index \$I \$J<a> \$J<b>" }; say "elements " ~ @y.elems;'
```
Index 0  aa  bb
Index 1  AA  BB
elements 2

But I still have to figure out how to

@y[0]={a=>"aa",b=>"bb"}

```
\$ p6 'my @y[0]={a=>"aa",b=>"bb"}; push @y, {a=>"AA",b=>"BB"}; for @y.kv -> \$I, \$J { say "Index \$I \$J<a> \$J<b>" }; say "elements " ~ @y.elems;'
```Illegal dimension in shape: 0. All dimensions must be integers bigger than 0
in block <unit> at -e line 1
```