How to access data for using it inside head? In this case I want to access title

Even the given example here Developer Documentation - Prismic from Phil Snow is not doing it, is that not possible?
How to access data for using it inside head? In this case I want to access title

Even the given example here Developer Documentation - Prismic from Phil Snow is not doing it, is that not possible?
Fixed using this, btw I think this should included in the example because this is one of the essential thing

@wahabiputra Thanks for posting your question and solution! I'm glad you worked through it.
We'll look into adding more information on this, either in the example or in our documentation.