How to access a cookie from javascript which has a path set to a value other than /

I am trying to read a cookie from javascript which is not http only, and has the path set to /exports.

This cookie is not included in document.cookie. But if I change the path to /, it becomes available in document.cookie.

What is the reason for this? How can I access this cookie via javascript?