How do you add multiple blocks to the "can_place_on" tag?

For example, how do I give 1 stone to myself that can be placed on grass and dirt? This is what I’ve got so far:

/give @s stone 1 0 {"can_place_on":{"blocks":["grass"]}}

I haven’t figured out how to add multiple blocks yet.


Solution 1:

The square brackets indicate a list, in which you can include any number of elements separated by commas. For example:

/give @s stone 1 0 {"can_place_on":{"blocks":["grass","stone","sponge","dirt"]}}