✅ – venus – 11-48 Jun 9

Hey, I want to extract which locale is being used in that specific article. _raw is an output where should be that locale taken from. What is the best way to extract it? In this case it's en.
const _raw = {
sourceFilePath: 'articles/en/new-web.mdx',
sourceFileName: 'new-web.mdx',
sourceFileDir: 'articles/en',
contentType: 'mdx',
flattenedPath: 'articles/en/new-web'
};
const _raw = {
sourceFilePath: 'articles/en/new-web.mdx',
sourceFileName: 'new-web.mdx',
sourceFileDir: 'articles/en',
contentType: 'mdx',
flattenedPath: 'articles/en/new-web'
};
UU
Unknown User678d ago
V
venus678d ago
Yeah something like so?
const pathArray = path.split("/");
const locale = pathArray[1];
const pathArray = path.split("/");
const locale = pathArray[1];
UU
Unknown User678d ago
V
venus678d ago
Okay, thanks
UU
Unknown User677d ago