Question: I am rendering This piece of JSON(1) using angular.js 1.6, The title and description seem to load, however I am unable to get the url from the images property, it currently displays it like this :

```
 <img ng-src="{"original": "https://xxx-export.s3.amazonaws.com/images/products/2016/12/product_1003_2.jpg"}">

```

How would I go about just getting the url to render in my template?

(1)This is the reference for of my json object:

```
   var items = [
      {
          "id": 61,
          "title": "Title 1",
          "description": "Desc",

         "images": [
              {
                  "original": "https://xxx-export.s3.amazonaws.com/images/products/2016/12/product_1003_2.jpg"
              },
              {
                  "original": "https://xxx-export.s3.amazonaws.com/images/products/2016/12/product_1003_5.jpg"
              },
              {
                  "original": "https://xxx-export.s3.amazonaws.com/images/products/2016/12/product_1003_3.jpg"
              }

          ]
];

```

(2) This is the how the data is being displayed in my template

```
<div ng-repeat="item in Item">
   <img ng-src="{$item.images[0]$}" />
    <h4>{$item.title$}</h4>
    <p>  {$item.description$} </p>
</div>

```

Answer: 
Per [the docs](https://docs.python.org/3/library/string.html#format-string-syntax):

> 
> A `format_spec` field can also include nested replacement fields within it. These nested replacement fields may contain a field name, conversion flag and format specification, but deeper nesting is not allowed. The replacement fields within the `format_spec` are substituted before the `format_spec` string is interpreted. This allows the formatting of a value to be dynamically specified.
> 
> 
> 

---

So, for example, you could use:

```
In [207]: "{i:<{numspaces}}".format(numspaces=10, i=123)
Out[207]: '123       '

```
You could always do

```
("{:"+str(numSpaces)+"}").format(i)

```

Alternatively,

```
("{:{numSpaces}}").format(i, numSpaces=4)

```