Board Thread:Questions and Answers/@comment-30266474-20170601163050/@comment-37840456-20190615194314

I know I may be a little late, but if you're on minecraft bedrock edition, try /give @p iron_axe 1 0 {"can_destroy":{"blocks":["log"]}}

Of course, you can replace iron axe into the item you use the destroy and log into the block being destroyed. Also, if you want the can place on version, replace can_destroy with can_place_on.

Hoped it helps.