I'm writing a method in SpringBoot which reads the property file and produce JSON through endpoints. My property file looks like this:
Category.1=Quality=A,B,C,D
Category.2=Program=E,F,G
Category.3=Efficiency=H,I,J,K
I need to read only the values which is starting from Category ,my property file may contain other data. The JSON should look like this:
{
"Quality":[
"A",
"B",
"C",
"D"
],
"Program":[
"E",
"F",
"G"
],
"Efficiency":[
"H",
"I",
"J",
"K"
]
}
I need to create a REST endpoints to get this JSON value. I know how to read the property file and get the values. As this property file is bit complex to me I need to get Quality , Program and efficiency as the key and remaining as it's value. I'm new to programming please help me out.