Question: **Input** :

```
{
    "id": "123",
    "address": [{
        "street": "5",
        "city": "ameerpet",
        "pin": "500073"
    }, {
        "street": "6",
        "city": "sec",
        "pin": "500020"
    }]
}

```

Note: ["LAA001","LAA002","LAA003"] -> use this as a variable

**Required output**:

```
[{
        "id": "123",
        "lob": "LAA001",
        "attributeText": "5"
    },
    {
        "id": "123",
        "lob": "LAA001",
        "attributeText": "6"
    },
    {
        "id": "123",
        "lob": "LAA002",
        "attributeText": "ameerpet"
    },
    {
        "id": "123",
        "lob": "LAA002",
        "attributeText": "sec"
    },
    {
        "id": "123",
        "lob": "LAA003",
        "attributeText": "500073"
    },
    {
        "id": "123",
        "lob": "LAA003",
        "attributeText": "500020"
    }
]

```

Answer: 
One option would be the [`ggtext`](https://wilkelab.org/ggtext/index.html) package which via the theme element `element_markdown` allows to style theme elements via markdown, HTML and CSS.

To achieve your desired result you have to wrap the parts of your text for which you want to have different font sizes in a `<span>` tag for which you could set the desired `font-size` via the `style` attribute. Also note, that as we are in the World of HTML we have to use a `<br>` tag for a line break.

Also keep in mind that not all possibilities of CSS are available. According to the [docs](https://wilkelab.org/ggtext/articles/introduction.html) only

> 
> The CSS properties color, font-size, and font-family are currently supported.
> 
> 
> 

```r
library(ggplot2)
library(ggtext)

ggplot(mtcars, aes(wt, mpg)) + 
  geom_point() +
  labs(
    x = paste0("<span style='font-size: 11pt'>This is the axis of</span><br><span style='font-size: 12pt'>wt</span>"),
    y = paste0("<span style='font-size: 11pt'>This is the axis of</span><br><span style='font-size: 12pt'>mpg</span>")) +
  theme(axis.title.x = ggtext::element_markdown(),
        axis.title.y = ggtext::element_markdown())

```

![](https://i.imgur.com/XNHmLGf.png)
While @stefans answer is perfect. I tried to apply what I learned here [ggplot2 two-line label with expression](https://stackoverflow.com/questions/13223846/ggplot2-two-line-label-with-expression) using `draw_label` from `cowplot` package to this use case:

```

library(cowplot)  
library(ggplot2)

# define your axis titles
line_1 <- "This is the axis of"
x_line_2 <- "wt"
y_line_2 <- "mpg"

# plot and prepare plot for annotations
p <- ggplot(mtcars, aes(wt, mpg))+
  geom_point() +
  xlab("") +
  ylab("") +
  theme(axis.title.x = element_text(margin = margin(t = 10, r = 0, b = 0, l = 0,
                                                    unit = "mm")),
        axis.title.y = element_text(margin = margin(t = 0, r = 20, b = 0, l = 0,
                                                    unit = "mm"))
        )

# use draw_label with custom positions
ggdraw(p) +
  draw_label(line_1, x = 0.55, y = 0.035, size= 11) + # use relative coordinates for positioning
  draw_label(x_line_2, x = 0.55, y = 0.015, size= 12)+
  draw_label(line_1, y = 0.55, x = 0.028, size= 11, angle = 90) +
  draw_label(y_line_2, y = 0.55, x = 0.038, size= 12, angle = 90)

```

[![enter image description here](https://i.stack.imgur.com/FLY8d.png)](https://i.stack.imgur.com/FLY8d.png)