I imported the OSM tile layer into Javascript (leaflet), and can see it visually. But how do I access the actual data of the layer? It's vector data, made of points, lines, and polygons, right? How can I access the feature data for some part of the map with Javascript, like as json?

Ex: Get the data for the polylines/polygons making up the streets/blocks of a town.