The same structure is used in other places.
Det var dejligt med noget luft/ det var dejligt at få noget luft. It was nice to get some fresh air
Det er dejligt med sne om vinteren/det er dejligt at få sne om vinteren. It is lovely to get snow in the winter
Det er dejligt med tørvejr/ det er dejligt at få tørvejr. It is nice to get some dry weather
I think people are too keen to get a word for word translation between two languages. Danish is not simply English with different words.
Not knowing the idiom I translated it literally - ie "It was lovely with some food", thinking it might mean that something like a particular wine was nice with food (!) My translation was marked correct - so can it have this meaning and the more idiomatic 'lovely to get some food'?